package com.sjr.easy.chat.app.utils;

import com.alibaba.fastjson2.JSON;
import com.sjr.easy.chat.app.dto.AppTokenInfo;
import com.sjr.easy.chat.utils.SHA256;

public class AppTokenUtils {

    public static String generateToken(AppTokenInfo appTokenInfo) {
        if (appTokenInfo == null) {
            return "";
        }
        return SHA256.cryptToHexString(JSON.toJSONString(appTokenInfo));
    }
}
